-- CALC_ARTIFACT_UPGRADE_LEVEL_COST

-- 神器升级消耗
return function(level, classId, extraPara)
    -- 获得神器碎片ID
    local scrapId = classId + 200;

    local scrapCountArr = { 10, 20, 40, 80, 160, 240, 320};
    local moneyNumArr = { 1, 5, 10, 20, 40, 60, 80};

    local scrapCost = scrapCountArr[level + 1];
    local moneyCost = moneyNumArr[level + 1] * 10000;

    -- 消耗降低属性
    local prop = PropM.combine(ME.user, "upgrade_cost", 1);
    moneyCost = PropM.apply(prop, moneyCost);

    -- 合成不能用遗物替代/提示合成只能用碎片量判断
    if level == 0 or (extraPara and extraPara == "scarpNeed") then
        return {{1, scrapId, scrapCost}, {2, "money", moneyCost}}
    else
        local correctCost = FormulaM.invoke("CALC_ARTIFACT_UPGRADE_CORRECT_COST", classId, scrapId, scrapCost);
        table.insert(correctCost, { 2, "money", moneyCost });
        return correctCost;
    end

end